<?php 
	include('template/header.php');
	include('classess/user_subscribe.php');
	$crs_fee = '';
?>
	<style>
		.right_container{
			margin-top:0px;
		}
	</style>
	<!-- Page Content -->
	
	<section  class="homepage-slider" id="home-slider">
		<div class="flexslider">
			<ul class="slides">
				<li>
					<img src="img/slider/first_image.jpg" alt="No Image" />					
				</li>
				<li>
					<img src="img/slider/second_image.jpg" alt="No Image" />					
				</li>
			</ul>
		</div>			
	</section>
	
	<section class="header_text sub">
				<h4><span>Shopping Cart</span></h4>
			</section>
			<section class="main-content">				
				<div class="row">
					<div class="span9">					
						<h4 class="title"><span class="text"><strong>Your</strong> Cart</span></h4>
						<?php if(!isset($_GET['ebk_chk'])){ 
								if(isset($_SESSION['course_id'])){
									$select_single_course = "SELECT * FROM tbl_courses WHERE id = '".$_SESSION['course_id']."'";
									$course_query = mysql_query($select_single_course) or die(mysql_error());	
									$i =1;
									if(mysql_num_rows($course_query)){
							?>
						<table class="table table-striped">
							<thead>
								<tr>
									<th>S. No.</th>
									<th>Course Name</th>
									<th>Course Descritipion</th>
									<th>Course Date</th>
									<th>Price</th>
									<th>Total</th>
								</tr>
							</thead>
							<tbody>
								<?php
									while($data = mysql_fetch_array($course_query)){
										$crs_fee = $data['course_fee'];
								?>
									<tr>
										<td><?php echo $i; ?></td>
										<td><?php echo $data['course_name']; ?></td>
										<td><?php echo $data['course_description']; ?></td>
										<td><?php echo $data['course_from'].' to '.$data['course_to'] ; ?> </td>
										<td><?php echo $data['course_fee']; ?></td>
										<td><?php echo $data['course_fee']; ?></td>
									</tr>
									<tr>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td><strong><?php echo $data['course_fee']; ?></strong></td>
								</tr>
								<?php
									$i++;
									}
								}
						?> 				  
							</tbody>
						</table>						
						<hr>
						<p class="cart-total right">
							<!--<strong>VAT </strong>: 1000<br>-->
							<strong>Total</strong>: <?php echo '$'.$crs_fee; ?><br>
						</p>
						<hr/>
						<p class="buttons center">
							<a href="checkout.php?home=1"><button class="btn btn-inverse" type="button" id="checkout">Checkout</button></a>
						</p>
						<?php 
								}else{
									echo 'Wrong Course Id';
								}
						
							} 
						?>
						<?php if(isset($_GET['ebk_chk'])){ 
								if(isset($_SESSION['course_id'])){
									$select_single_ebook = "SELECT * FROM tbl_ebook WHERE id = '".$_SESSION['course_id']."'";
									$ebook_query = mysql_query($select_single_ebook) or die(mysql_error());	
									$i =1;
									if(mysql_num_rows($ebook_query)){
							?>
						<table class="table table-striped">
							<thead>
								<tr>
									<th>S. No.</th>
									<th>Ebook Name</th>
									<th>Ebook Descritipion</th>
									<th>Price</th>
									<th>Total</th>
								</tr>
							</thead>
							<tbody>
								<?php
									while($data = mysql_fetch_array($ebook_query)){
										$crs_fee = $data['ebook_fee'];
								?>
									<tr>
										<td><?php echo $i; ?></td>
										<td><?php echo $data['ebook_name']; ?></td>
										<td><?php echo $data['ebook_description']; ?></td>
										<td><?php echo $data['ebook_fee']; ?></td>
										<td><?php echo $data['ebook_fee']; ?></td>
									</tr>
									<tr>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td>&nbsp;</td>
									<td><strong><?php echo $data['ebook_fee']; ?></strong></td>
								</tr>
								<?php
									$i++;
									}
								}
						?> 				  
							</tbody>
						</table>						
						<hr>
						<p class="cart-total right">
							<!--<strong>VAT </strong>: 1000<br>-->
							<strong>Total</strong>: <?php echo '$'.$crs_fee; ?><br>
						</p>
						<hr/>
						<p class="buttons center">
							<a href="checkout.php?ebk_chk=1"><button class="btn btn-inverse" type="button" id="checkout">Checkout</button></a>
						</p>
						<?php 
								}else{
									echo 'Wrong Course Id';
								}
						
							} 
						?>
					</div>
					<?php include('template/right_panel.php'); ?>
					<!--<div class="span3 col">
						<div class="block">	
							<ul class="nav nav-list">
								<li class="nav-header">More Info</li>						
							</ul>
							<p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like)</p>					
						</div>
					</div>-->
				</div>
			</section>		
   
<?php include('template/footer.php'); ?>
